import * as api from '../../api/table';

export default {
    namespaced: true,
    state: {
        list: [],
    },
    mutations: {
        UPDATE_LIST (state, newList) {
            state.list = newList;
        },
    },
    actions: {
        async updateTableData (ctx, params) {
            const data = await api.getTableData(params);
            ctx.commit('UPDATE_LIST', data);
        },
    },
}
